let swiperInstance=null;function initSlider(){if(swiperInstance){swiperInstance.destroy(!0,!0)} swiperInstance=new Swiper('.gwd-slider-swiper',{loop:!0,speed:800,autoplay:{delay:1500,disableOnInteraction:!1,},slidesPerView:6,spaceBetween:20,breakpoints:{0:{slidesPerView:4},768:{slidesPerView:6},1200:{slidesPerView:8}},navigation:{nextEl:'.gwd-slider-next',prevEl:'.gwd-slider-prev',}})} function setCardHeight(){const cards=document.querySelectorAll('.gwd-slider-brand-card');if(cards.length===0)return;cards.forEach(card=>card.style.height='auto');let maxHeight=0;cards.forEach(card=>{const h=card.offsetHeight;if(h>maxHeight)maxHeight=h});cards.forEach(card=>{card.style.height=maxHeight+'px'})} document.addEventListener('DOMContentLoaded',function(){initSlider()});window.addEventListener('load',()=>{setCardHeight();setTimeout(()=>{if(swiperInstance){swiperInstance.update()}},100)});window.addEventListener('resize',()=>{clearTimeout(window.resizeTimer);window.resizeTimer=setTimeout(()=>{setCardHeight();if(swiperInstance){swiperInstance.update()}},250)});window.reloadSlider=function(){setCardHeight();initSlider()} ;